1. Field of the Invention
The present invention is related generally to control of host adapter systems that control transfer of data between two buses, and more specifically to a method for controlling the sequence of execution of control blocks by a host adapter system.
2. Description of Related Art
The Small Computer System Interface (SCSI) standard, which is specified by the American National Standards Institute (ANSI X3.131-1986, which is incorporated herein by reference in its entirety) of 1430 Broadway, New York, N.Y. 10018, is an example of an industry-recognized standard for a relatively complex local area network. Descriptions of the SCSI bus may be found for example in U.S. Pat. No. 4,864,291 "SCSI Converter" issued Sep. 5, 1989 to J. E. Korpi and in U.S. Pat. No. 4,905,184 "Address Control System for Segmented Buffer Memory" issued Feb. 27, 1990, to R. P. Giridhar, et al., which are incorporated herein by reference in their entirety.
A typical SCSI system 100 is illustrated in FIG. 1. A plurality of intelligent devices 120, 140, 141, 142 are coupled to SCSI bus 110 so that these devices can exchange information. The intelligent devices are (i) a first host system 120, whose internal structure is shown in detail, that includes host adapter system 160 (ii) a second host system 140 whose internal structure is similar to that shown for system 120, (iii) a first SCSI disk drive unit (Target-A) 141, and (iv) a second SCSI disk drive unit (Target-B) 142. The host adapter system in a host computer can be either a single integrated circuit, or a plug-in board. In each case, the host adapter system, hereinafter host adapter, transfers data between a host computer bus, e.g., an ISA bus, an EISA bus, a VME bus, or a PCI bus, and a SCSI bus.
Typically, a software driver, executing on CPU 121 of host computer 120, builds and sends a command block to host adapter 160. Each command block specifies exactly how a SCSI command is to be executed. Host adapter 160 executes the command block, and interrupts host computer 120 to report completion of the execution. Herein, execution of a command block means performance of the SCSI command contained in the command block. Consequently, host computer 120 is interrupted at least once for every command block.
Host adapter 160 does not correlate one command block with another, and executes each command block independent of all others. Host adapter 160 may order the execution of a group of command blocks according to some criterion, such as a first-in-first-out execution order. However, typically no execution ordering information is provided by the software driver that generates and transmits the command blocks to host adapter 160.
Nevertheless, at levels higher than host adapter 160, SCSI commands are often associated in a group. For example, tagged queue commands are members of a queue group. Host adapter 160 manages tagged queue commands as a special command type, but the command blocks for such commands are still managed as independent individual command blocks.
Commands issued to a redundant array of inexpensive disks (RAID) over a SCSI bus are grouped by a RAID manager that executes on the host computer, but the commands are seen as individual, unrelated SCSI commands by the host adapter. For example, a RAID 5 write command is a group of four SCSI commands, two read commands and two write commands, that are executed in a prescribed order. The RAID manager controls the execution order by waiting for the read commands to complete before issuing the write commands. Consequently, the host adapter sees a stream of unrelated read and write commands.
The control of the execution order by the RAID manager places a burden on the computer executing the RAID manager and the performance of the RAID manager can be affected by interrupts to the host computer that are unrelated to the RAID write command. Similarly, the performance of a computer executing a SCSI host adapter driver could be enhanced if the computer was interrupted less than once per command block, and the execution time of each command block could be enhanced if it was not necessary to handle each command block independently.
U.S. Pat. No. 5,131,082, entitled "Command Delivery for a Computing System for Transfers Between a Host and Subsystem Including Providing Direct Commands or Indirect Commands Indicating the Address of The Subsystem Control Block," of Bonevento et al. shows a structure for chaining together subsystem control blocks so that the chain of subsystem control blocks is treated as one logical request. However, this structure and method requires considerable storage space. Each subsystem control block includes a chain flag, a conditional chain field, first and second chain addresses and a chain identification field.
Further, for each subsystem control block in a chain, a termination status block is defined to make it possible to handle termination at any point in the chain. Consequently, the storage required by the chain is not limited to storage required to specify the chain itself but also the storage for the termination status blocks.
The chain disclosed in this patent appears to be a variation of a linked list. Only one of the two chain addresses is used. A device task decides which chain address to select from the subsystem control block depending on the ending state of the subsystem control block. Consequently, the chain allows only branching to one of the two chain addresses and so functions as a linked list with a possible choice of paths at each item in the list.
Thus, despite the excessive storage requirements in the subsystem control block, the chain of Bonevento et al. has only limited capability. The chain structure does not support parallel simultaneous execution paths, enabling execution of multiple control blocks simultaneously, aborting a control block in the chain, or a method for determining when parallel execution paths have completed. Therefore, a more flexible chaining method and structure is needed.